package org.jeecg.common.validation.constraints;

import org.jeecg.common.validation.validators.NotBlankButCanNullValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = NotBlankButCanNullValidator.class)
public @interface NotBlankButCanNull {
    String message() default "字符串不能为空但可以为null";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}